<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		class 继承
		<script>
			class Parent{
				constructor(name,age) {
				    this.name=name;
					this.age=age;
				}
				show(){
					console.log("我是父类方法");
				}
			}
			let p=new Parent("lili",18);
			console.log(p);
			
			
			class Child extends Parent{
				constructor(job,name,age) {
					super(name,age);//私有继承私有  公有继承公有
					//this.name=name;
					//this.age=age;
				    this.job=job;
				}
				myjob(){
					super.show();
					console.log("这是我的职称：",this.job);
				}
			}
			let c=new Child("程序员","李丝滑",88);
			console.log(c);
			
			c.myjob();
		</script>
	</body>
</html>
